		     -----------------------------------
		        EAPI library for SECO Modules
		     -----------------------------------
	       Revision 1.20.10 - Build 670 2014/02/24
	         Copyright (C) 2003-2014 SECO s.r.l.

1. Release note
   The EAPI library for SECO Q7 Module should be applicable to the
   following SECO boards:

   (1) QuadMo747-Z5xx              (0747)
   (2) QuadMo747-Extreme         (0866)
   (3) QuadMo747-E6xx              (0881)
   (4) QuadMo747-E6xx-Extreme (0963)
   (5) QuadMo747-GSeries         (0888)
   (6) QuadMo747-x2000            (0978)
 
   The library wants to help developers to use the special features
   of SECO boards that normally operating systems does not manage.
   The exported functions follow the Qseven(R) Specifications v.1.20,
   in addition to these, EAPI library provide some other function for
   specific board features that the standard doesn't contemplate.

   The library can work under Windows XP, Windows Vista, Windows 7 (32/64bit),
   Windows XP Embedded, WES 2009, WES 7, Windows CE 6.0, Linux (32/64bit).

   This EAPI library can also used with the following not Q7 standard 
   SECO modules:

   (7)  SECOMExp-GSeries (0900)
   (8)  SECOMExp-x2000    (0902)
   (9)  SECOpITX-x2000     (0949)
   (10) SECOpITX-GX        (0992)

2. Revision note

   (V.1.20.10) 	
        - Add support for SECOMExp-x2000 (0902)
		- Add support for SECOpITX-x2000 (0949)
		- Add support for QuadMo747-x2000 (0978)
		- Add support for QuadMo747-E6xx-Extreme (0963)
		- Add support for SECOpITX-GX (0992)
		- Not more validated on SECOMEXP-PNW (0808)
		- Not more validated on SECOMEXP-ION (0751)
		- Not more validated on SECOMEXP-PNW (0808)
		- Not more validated on SECOMEXP-945/M72 (0771)
		- Not more validated on SECOMExp-965 (0794)
		- Not more validated on QuadMo747-X/OMAP3 (0796)

   (V.1.20.9) 	
        - Add support for Quadmo747-x/E6xx (0881)
		- Add support for Quadmo747-x/GSeries (0888)
		- Add support for SECOMEXP-PNW (0808)
		- Add support for SECOMEXP-ION (0751)
		- Add support for SECOMEXP-945/M72 (0771)
		- Correct temperature value experess in 0,1K
		- 'EApiLibInitialize' function optimization for concurrent access
		- 'EapiLibUnInitialize'fnction optimization
		- Modify extra Q7 standard function prototipes for: 
			EApiFanEnable
			EApiFanPWMGetCycle
			EApiFanPWMSetCycle
			EApiFanPWMSetDutyCycle
		- Optimization SMBus communication
		- Add extra function for 0751:
			EApiGPIOGetPolarity
			EApiGPIOSetPolarity
		- Add support for Windows 7 64 bit, Linux Ubuntu 64 bit.
		- Bug fixing on I2C routines
		- Add GPIO management on M799 and M901 carrier board
		- Add backlight management for M881 board

   (V.1.20.8) Internal release
   
   (V.1.20.7) Internal release

   (V.1.20.6) Internal release

   (V.1.20.5) Add support for M796 (under ubuntu 11.04)

   (V.1.20.4) Add support for M796 (under Windows CE 6.0) and M860 (under Windows XP/Vista/7 and ubuntu 11.04)
   
   (V.1.20.3) Correct reading value in EAPI_ID_HWMON_FAN_CPU and relative sample application

   (V.1.20.1) Optimize communications with Embedded controller

   (V.1.20.0) First revision.

   
3. File description
   The package contains files as described below:

   readme.txt											This document
   COM_EAPI_R1_0.pdf							Q7 standard library documentation (http://www.picmg.org/pdf/COM_EAPI_R1_0.pdf)
   EAPI_Supported_Functions.pdf			EAPI suppurted functions check list
   
   BIN\release_ce\EAPI.dll										EAPI SECO Dll for Windows CE 6.0 / WEC7 (x86 devices)
   BIN\release_ce\eapi.lib										EAPI SECO Library for Windows CE 6.0 / WEC7 (x86 devices)
   BIN\release_ce\EAPI_Exe_CE.exe						EAPI SECO testing software for Windows CE 6.0 / WEC7 (x86 devices)
   BIN\release_ce\EAPI_Exe_CE_CrossP.exe			EAPI SECO testing software for Windows CE 6.0 / WEC7 for Q7 Crossplatform I2C devices (x86 devices)
   
   BIN\release_ce_risc\EAPI.dll								EAPI SECO Dll for Windows CE 6.0 / WEC7 (ARM devices)
   BIN\release_ce_risc\eapi.lib								EAPI SECO Library for Windows CE 6.0 / WEC7 (ARM devices)
   BIN\release_ce_risc\EAPI_Exe_CE.exe				EAPI SECO testing software for Windows CE 6.0 / WEC7 (ARM devices)
   BIN\release_ce_risc\EAPI_Exe_CE_CrossP.exe	EAPI SECO testing software for Windows CE 6.0 / WEC7 for Q7 Crossplatform I2C devices (ARM devices)

   BIN\release_linux\libEAPI.a									EAPI SECO Library for Linux (x86 devices)
   BIN\release_linux\EAPI_Exe								EAPI SECO testing software for Linux (x86 devices)

   BIN\release_linux_omap\libEAPI.a						EAPI SECO Library for Linux (ARM devices)
   BIN\release_linux_omap\EAPI_Exe						EAPI SECO testing software for Linux (ARM devices)

   BIN\release_linux_amd64\libEAPI.a						EAPI SECO Library for Linux (amd64 devices)
   BIN\release_linux_amd64\EAPI_Exe					EAPI SECO testing software for Linux (amd64 devices)

   BIN\release_xp\Eapi.dll										EAPI SECO Dll for Windows XP/Vista/7,/XPe/WES2009/WES7 (x86 devices)
   BIN\release_xp\Eapi.lib										EAPI SECO Library for Windows XP/Vista/7,/XPe/WES2009/WES77 (x86 devices)
   BIN\release_xp\EAPI_Exe_XP.exe						EAPI SECO testing software for XP/Vista/7,/XPe/WES2009/WES7 (x86 devices)
   BIN\release_xp\EAPI_Exe_CE_CrossP.exe			EAPI SECO testing software for XP/Vista/7,/XPe/WES2009/WES7 for Q7 Crossplatform I2C device (x86 devices)
   	
   BIN\release_xp_x64\Eapi.dll									EAPI SECO Dll for Windows XP/Vista/7 (x64 devices)
   BIN\release_xp_x64\Eapi.lib								EAPI SECO Library for Windows XP/Vista/7 (x64 devices)
   BIN\release_xp_x64\EAPI_Exe_XP.exe				EAPI SECO testing software for XP/Vista/7 (x64 devices)
   BIN\release_xp_x64\EAPI_Exe_CE_CrossP.exe	EAPI SECO testing software for XP/Vista/7 for Q7 Crossplatform I2C device (x64 devices)
   
   Project\EAPI_Library_CE\EAPI_Exe_CE.vcproj				EAPI SECO sample testing project for Windows CE 6.0 / WEC7 with Visual Studio 2005
   Project\EAPI_Library_CE\EAPI_Exe_CE_CrossP.vcproj	EAPI SECO sample testing project for Windows CE 6.0 / WEC7 with Visual Studio 2005 for Q7 Crossplatform I2C device

   Project\EAPI_Library_Linux_Omap\main.cpp		EAPI SECO sample testing code for Linux (ARM devices)

   Project\EAPI_Library_Linux_and64\main.cpp		EAPI SECO sample testing code for Linux (amd64 devices)

   Project\EAPI_Library_Linux_x86\main.cpp			EAPI SECO sample testing code for Linux (x86 devices)

   Project\EAPI_Library_XP\EAPI_Exe_XP.vcproj			EAPI SECO sample testing project for XP/Vista/7,/XPe/WES2009/WES7 with Visual Studio 2005
   Project\EAPI_Library_XP\EAPI_Exe_XP_Cross.vcproj	EAPI SECO sample testing project for XP/Vista/7,/XPe/WES2009/WES7 with Visual Studio 2005

   Sources\Dll\Eapi.h					EAPI SECO header for Qseven standard functions
   Sources\Dll\Eapi_Seco.h		EAPI SECO header for SECO functions

   Sources\Exe_CE\*					EAPI SECO sample testing souce code for Windows CE 6.0 / WEC7

   Sources\Exe_XP\*					EAPI SECO sample testing souce code for for XP/Vista/7,/XPe/WES2009/WES7

   Sources\include\*					EAPI SECO header for Qseven standard functions


3. Application notes

	3.1. Windows XP, Windows Vista, Windows 7, Windows XP Embedded, WES 2009, WES 7

	     Working under Windows Vista, Windows 7 and WES 7 you need to have administrator privileges for use EAPI SECO library.

	3.2. Linux
	
	     Working under Linux you need to have administrator privileges for use EAPI SECO library.
	     In order to use  EApiBoardGetValue -> EAPI_ID_HWMON_CPU_TEMP function (where supported) 
		 you need to install 'msr-tools' package for your distribution.
	     EAPI SECO x86 library is compiled with gcc 4.7.3.1 and is tested with kernel 3.8.0-32 on Ubuntu 13.04.
	     EAPI SECO ARM library is compiled with gcc 4.7.3.1 and is tested with kernel 3.8.0-32 on Ubuntu 13.04.
	     EAPI SECO AMD64 library is compiled with gcc 4.6.1.2 and is tested with kernel 3.0.0-32 on Ubuntu 11.10.
		 
	     Linux distribution with kernel 3.8 or later, need to put SP5100_TCO device on driver BlackList.
		 
	3.3 Functions pinout
		
		I2C's functions drive I2C_Clock and I2C_Data on the following pins:
		  
	   (1) QuadMo747-Z5xx              Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (2) QuadMo747-Extreme         Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (3) QuadMo747-E6xx              Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (4) QuadMo747-E6xx-Extreme Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (5) QuadMo747-GSeries         Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (6) QuadMo747-x2000            Pin 66 (I2C_CLK) and Pin 67 (I2C_DAT) on Q7 connector
	   (7)  SECOMExp-GSeries 		Pin B33 (I2C_CLK) and Pin B34 (I2C_DAT) on ComEx connector
	   (8)  SECOMExp-x2000    		Pin B33 (I2C_CLK) and Pin B34 (I2C_DAT) on ComEx connector
	   (9)  SECOpITX-x2000     		Not supported
	   (10) SECOpITX-GX        		Not supported
	   
		GPIO's functions drive GPIO on the following pins:
		  
	   (1) QuadMo747-Z5xx              Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (2) QuadMo747-Extreme         Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (3) QuadMo747-E6xx              Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (4) QuadMo747-E6xx-Extreme Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (5) QuadMo747-GSeries         Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (6) QuadMo747-x2000            Pin 2-10 on CN10 connector on SECOCQ7-pITX/Xboard carrier board all configurable as Input or Output
	   (7)  SECOMExp-GSeries 		Pin A54-A63-A67-A85 as Input and A93-B54-B57-B63 as Output on ComEx connector
	   (8)  SECOMExp-x2000    		Pin A54-A63-A67-A85 as Input and A93-B54-B57-B63 as Output on ComEx connector
	   (9)  SECOpITX-x2000     		Pin A54-A63-A67-A85 as Input and A93-B54-B57-B63 as Output on ComEx connector
	   (10) SECOpITX-GX        		Pin A54-A63-A67-A85 as Input and A93-B54-B57-B63 as Output on ComEx connector
		 
		EApiBoardGetValue function for EAPI_ID_HWMON_FAN_CPU monitor following pin:
		 
	   (1) QuadMo747-Z5xx              Pin 195 (FAN_TACHION) on Q7 connector
	   (2) QuadMo747-Extreme         Pin 195 (FAN_TACHION) on Q7 connector
	   (3) QuadMo747-E6xx              Not supported
	   (4) QuadMo747-E6xx-Extreme Not supported
	   (5) QuadMo747-GSeries         Pin 3 CN3
	   (6) QuadMo747-x2000            Pin 3 CN2
	   (7)  SECOMExp-GSeries 		Pin 3 CN2
	   (8)  SECOMExp-x2000    		Pin 3 CN2
	   (9)  SECOpITX-x2000     		Pin 3 CN9
	   (10) SECOpITX-GX        		Pin 3 CN6
		 
		EApiBoardGetValue function for EAPI_ID_HWMON_FAN_SYSTEM monitor following pin:
		 
	   (1) QuadMo747-Z5xx              Not supported
	   (2) QuadMo747-Extreme         Not supported
	   (3) QuadMo747-E6xx              Not supported
	   (4) QuadMo747-E6xx-Extreme Not supported
	   (5) QuadMo747-GSeries         Pin 195 (FAN_TACHION) on Q7 connector
	   (6) QuadMo747-x2000            Pin 195 (FAN_TACHION) on Q7 connector
	   (7)  SECOMExp-GSeries 		Pin C67 (RSVD2) on ComEx connector
	   (8)  SECOMExp-x2000    		Pin C67 (RSVD2) on ComEx connector
	   (9)  SECOpITX-x2000     		Not supported
	   (10) SECOpITX-GX        		Not supported
		 
		 	 
		 
		 
4. Extra standard features

	4.1 Speed Fan Control Functions
	
		 - EasiFanEnable
		 - EasiFanDisable
		 - EasiFanPWMGetCycle
		 - EasiFanPWMSetCycle
		 - EasiFanPWMGetDutyCycle
		 - EasiFanPWMSetDutyCycle	

		 The EApi library allows you to configure and control Fan speed by these functions.
		 With 'EApiFanEnable' and 'EApiFanDisable' function you can enabling and disabling PWM that control speed fan, 
		 'EApiFanEnable' function require also the Period (Cycle parameter) and the Duty Cycle (expressed in percent) for PWM.
		 'EApiFanPWMGetCycle', 'EApiFanPWMSetCycle', 'EApiFanPWMGetDutyCycle' and 'EApiFanPWMSetDutyCycle' 
		 are used to get and set the Period and DutyCycle for PWM, they could be use not only for speed fan control 
		 but also for any kind of PWM system.

		 Parameter:
		 
		 Cycle -> This parameter has different value depending on the board is used on:
		 
				- 0747 -> Number of steps (0-255) of 5 MHz clock divided into 255 single steps (19.6KHz-5MHz) - (MAX_CYCLE_STEPS = 255)
				- 0866 -> Number of steps (0-255) of 5 MHz divided into 255 single steps (19.6KHz-5MHz) - (MAX_CYCLE_STEPS = 255)
				- 0881 -> Number of steps (0-65535) of 3 MHz (0.33 us single step) divided into 65535 single steps (46Hz-3MHz) - (MAX_CYCLE_STEPS = 65535)
				- 0963 -> Number of steps (0-65535) of 3 MHz (0.33 us single step) divided into 65535 single steps (46Hz-3MHz) - (MAX_CYCLE_STEPS = 65535)
				- 0888 -> Not significant, there is a fixed frequency of 100 Hz (10 ms)
				- 0900 -> Not significant, there is a fixed frequency of 100 Hz (10 ms)
				- 0978 -> Frequency value expressed in Hz (0-65535 Hz) - (MAX_CYCLE_STEPS = 65535)
				- 0902 -> Frequency value expressed in Hz (0-65535 Hz) - (MAX_CYCLE_STEPS = 65535)

		 Duty Cycle -> Percent value (0-100)
		 
		 The output signal is connected to:

				- 0747 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0866 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0881 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0963 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0888 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0900 (Pin C77 (RSVD3) ComEx connector)
				- 0978 (Pin 196 (FAN_PWMOUT) Q7 connector)
				- 0902 (Pin C77 (RSVD3) ComEx connector)
 
		Refer to Eapi_Seco.h for additional information
		Refer to EAPI_Supported_Functions.pdf for complete support plan.

	4.2 Watch Dog Control Function
		 
	- EasiWDog_SetConfig

		- EasiWDog_SetConfig

		 This function can be used to set additional parameter for Watch Dog not provided by EAPI standard
		 definition. It's possible to set timeout, delay and mode:
		 The mode value refers to the following modality:

			Watch Dog event:
				- Signalation (EAPI_WTD_MODE_SIGNAL)
						Signalation on WDOUT / WDT signal .
						Supported by:
										0747 (Q7) -> WDOUT signal on pin 72 of Q7 connector 
										0866 (Q7) -> WDOUT signal on pin 72 of Q7 connector
										0888 (Q7) -> WDOUT signal on pin 72 of Q7 connector
				- Power button after 1 second (EAPI_WTD_MODE_PWRBTN_1SEC) (only on 0888)
				- Power button after 4 second (EAPI_WTD_MODE_PWRBTN_4SEC) (only on 0888)
				- Warm reset (EAPI_WTD_MODE_WARM_RESET) (only on 0747 /0866)
				- Cold reset (EAPI_WTD_MODE_COLD_RESET) (only on 0747 /0866)
				- Reboot (EAPI_WTD_MODE_SYSTEM_RESET)
												
			Watch Dog trigger:
				- Software triggeer (EAPI_WTD_MODE_ENABLE_SW_TRIGGER)
					Enable software trigger using EApiWDogTrigger function
				- Hardware trigger (EAPI_WTD_MODE_ENABLE_HW_TRIGGER)
					Enable hardware trigger using WDTRIG signal 	
						Supported by:
										0747 (Q7) -> WDTRIG# signal on pin 70 of Q7 connector 
										0866 (Q7) -> WDTRIG# signal on pin 70 of Q7 connector
										0888 (Q7) -> WDTRIG# signal on pin 70 of Q7 connector
												
			Time format:
				- Timeout in minutes (EAPI_WTD_MODE_TIMEOUT_IN_MINUTES)
				- Delay in minutes (EAPI_WTD_MODE_DELAY_IN_MINUTES)

		 Note that Watchdog Modes are mutually exclusive.
		 The Watchdog has been specified as a single stage Watchdog that resets the system when timed out.

		 The following table summarizes the supported function for all SECO boards:

			EAPI_WTD_MODE_SIGNAL					supported by 0747 / 0866 / 0888
			EAPI_WTD_MODE_SYSTEM_RESET				supported by 0747 / 0866 / 0888
			EAPI_WTD_MODE_PWRBTN_1SEC				supported by			   0888
			EAPI_WTD_MODE_PWRBTN_4SEC				supported by			   0888
			EAPI_WTD_MODE_COLD_RESET				supported by 0747 / 0866 
			EAPI_WTD_MODE_WARM_RESET				supported by 0747 / 0866

			EAPI_WTD_MODE_DELAY_IN_MINUTES			supported by 0747 / 0866 / 0888
			EAPI_WTD_MODE_TIMEOUT_IN_MINUTES		supported by 0747 / 0866 / 0888

			EAPI_WTD_MODE_ENABLE_HW_TRIGGER			supported by 0747 / 0866 / 0888
			EAPI_WTD_MODE_ENABLE_SW_TRIGGER			supported by 0747 / 0866 / 0888
		
		Refer to Eapi_Seco.h for additional information
		Refer to EAPI_Supported_Functions.pdf for complete support plan.
 
	4.3 GPIO Control Functions
	
		 - EApiGPIOSetCarrier
		 
		 Working with SECO Pico ITX carrier board as SECOCQ7-pITX-Xboard, is necessary to call once this function before
		 using GPIO functions in order to set EAPI library to work with this carrier board; use the following defines:

		#define GPIO_CARRIER_NONE	0
		#define GPIO_CARRIER_M799	1
		#define GPIO_CARRIER_M901	2


		 - EApiGPIOGetSerialCfg
		 - EApiGPIOSetSerialCfg

		 The EApi library allows you to configure the serial port present on SECO picoITX carrier board (0799 and 0901)
		 as RS232 or RS485 or RS422.
		 With 'EApiGPIOGetSerialCfg' and 'EApiGPIOSetSerialCfg' functions you can get and set serial port
		 configuration using the following defines:
			GPIO_SERIAL_MODE_RS232
			GPIO_SERIAL_MODE_RS422
			GPIO_SERIAL_MODE_RS485TX
			GPIO_SERIAL_MODE_RS485RX
		
		Refer to Eapi_Seco.h for additional information
		Refer to EAPI_Supported_Functions.pdf for complete support plan.